<!DOCTYPE html>
<html>
<head>
   @include("/include/_header.html", {'title':'文件解析器'}){}
</head>
<body>


  <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
  	<input type="hidden" name="id" value="${config.id!}">
  	<div class="layui-form-item">
      <label class="layui-form-label">编号</label>
      <div class="layui-input-inline">
        <input type="text" name="code" lay-verify="required" placeholder="请输入编号" autocomplete="off" class="layui-input" value="${config.code!}">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">名称</label>
      <div class="layui-input-inline">
        <input type="text" name="name" lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input" value="${config.name!}">
      </div>
    </div>
    <div class="layui-form-item">
    	<div class="layui-row">
    		<div class="layui-col-xs8">
    			<label class="layui-form-label">文件处理器</label>
			      <div class="layui-input-block">
			        <input type="text" name="handlerCode" id="handlerCode" placeholder="请选择文件处理器" autocomplete="off" class="layui-input" value="${config.handlerCode!}" readonly>
			        <input type="hidden" name="handlerId" id="handlerId" value=${config.handlerId!}>
			      </div>
    		</div>
    		<div class="layui-col-xs4">
				<button class="layui-btn layui-btn-sm" style="margin-top: 5px;" id="selHandler">请选择</button>
			</div>
			 @include("/component/_select_handler.html", {'domId':'selHandler', 'inputName':'handlerCode', 'inputId':'handlerId'}){}
    	</div>	
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">操作类型</label>
      <div class="layui-input-block">
      	@if(isEdit=='YES' && config.opType=='READ') {
      		<t:radio dicCode="file_op_type" defaultValue="READ" name="opType"></t:radio>
      	@}else if(isEdit=='YES'  && config.opType=='WRITE'){
      		<t:radio dicCode="file_op_type" defaultValue="WRITE" name="opType"></t:radio>
      	@}else {
      		<t:radio dicCode="file_op_type" defaultValue="READ" name="opType"></t:radio>
      	@}
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">文件类型</label>
      <div class="layui-input-block">
      	@if(isEdit=='YES' && config.fileType=='FIXED') {
      		<t:radio dicCode="file_type" defaultValue="FIXED" name="fileType"></t:radio>
      	@}else if(isEdit=='YES'  && config.fileType=='SEP'){
      		<t:radio dicCode="file_type" defaultValue="SEP" name="fileType"></t:radio>
      	@}else {
      		<t:radio dicCode="file_type" defaultValue="SEP" name="fileType"></t:radio>
      	@}
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">文件路径</label>
      <div class="layui-input-inline">
        <input type="text" name="filePath" lay-verify="required" placeholder="请输入文件路径" autocomplete="off" class="layui-input" value="${config.filePath!}">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">文件名称</label>
      <div class="layui-input-inline">
        <input type="text" name="fileName" lay-verify="required" placeholder="请输入文件名称" autocomplete="off" class="layui-input" value="${config.fileName!}">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">OK文件名称</label>
      <div class="layui-input-inline">
        <input type="text" name="okFileName" lay-verify="required" placeholder="请输入OK文件名称" autocomplete="off" class="layui-input" value="${config.okFileName!}">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">分隔符</label>
      <div class="layui-input-inline">
        <input type="text" name="sepChar" lay-verify="required" placeholder="请输入分隔符" autocomplete="off" class="layui-input" value="${config.sepChar!}">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">字符集</label>
      <div class="layui-input-block">
      	@if(isEdit=='YES' && config.charSet=='GBK') {
      		<t:radio dicCode="file_charSet" defaultValue="GBK" name="charSet"></t:radio>
      	@}else if(isEdit=='YES'  && config.charSet=='UTF-8'){
      		<t:radio dicCode="file_charSet" defaultValue="UTF-8" name="charSet"></t:radio>
      	@}else {
      		<t:radio dicCode="file_charSet" defaultValue="UTF-8" name="charSet"></t:radio>
      	@}
      </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-inline">
        	@if(isNotEmpty(config.status) && "0" == config.status){
        		<input type="checkbox" name="status" lay-skin="switch" lay-filter="status-switch" lay-text="正常|禁用">
        	@}else {
        		<input type="checkbox" checked="checked" name="status" lay-skin="switch" lay-filter="status-switch" lay-text="正常|禁用">
        	@}
        </div>
    </div>
    
    <div class="layui-form-item">
      <label class="layui-form-label">备注</label>
      <div class="layui-input-inline">
        <textarea name="remark" style="width: 400px; height: 100px;" autocomplete="off" class="layui-textarea">${config.remark!}</textarea>
      </div>
    </div>
    
	<div class="layui-form-item layui-hide">
      <input type="button" lay-submit lay-filter="form-btn-save" id="form-btn-save" value="保存">
      <input type="button" lay-submit lay-filter="form-btn-cancel" id="form-btn-cancel" value="取消">
    </div>
  </div>
 
 
  @include("/include/_container.html", {'js':'/assets/filesys/fileparser/fileparser.js'}){}
</body>
</html>